import json
with open("D:\json.txt", "r") as f:
    data = f.read()
    print(data)
dict1 = {"user": "marton", "psw": "123456"}
with open('UserInfo.json', 'w') as f:
    json.dump(dict1, f)

